package com.ruoyi.warehousemanager.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehousemanager.mapper.NewApplyMapper;
import com.ruoyi.warehousemanager.domain.NewApply;
import com.ruoyi.warehousemanager.service.INewApplyService;

/**
 * 采购Service业务层处理
 * 
 * @author zyx
 * @date 2023-05-29
 */
@Service
public class NewApplyServiceImpl implements INewApplyService 
{
    @Autowired
    private NewApplyMapper newApplyMapper;

    /**
     * 查询采购
     * 
     * @param id 采购主键
     * @return 采购
     */
    @Override
    public NewApply selectNewApplyById(Long id)
    {
        return newApplyMapper.selectNewApplyById(id);
    }

    /**
     * 查询采购列表
     * 
     * @param newApply 采购
     * @return 采购
     */
    @Override
    public List<NewApply> selectNewApplyList(NewApply newApply)
    {
        return newApplyMapper.selectNewApplyList(newApply);
    }

    /**
     * 新增采购
     * 
     * @param newApply 采购
     * @return 结果
     */
    @Override
    public int insertNewApply(NewApply newApply)
    {
        return newApplyMapper.insertNewApply(newApply);
    }

    /**
     * 修改采购
     * 
     * @param newApply 采购
     * @return 结果
     */
    @Override
    public int updateNewApply(NewApply newApply)
    {
        return newApplyMapper.updateNewApply(newApply);
    }

    /**
     * 批量删除采购
     * 
     * @param ids 需要删除的采购主键
     * @return 结果
     */
    @Override
    public int deleteNewApplyByIds(Long[] ids)
    {
        return newApplyMapper.deleteNewApplyByIds(ids);
    }

    /**
     * 删除采购信息
     * 
     * @param id 采购主键
     * @return 结果
     */
    @Override
    public int deleteNewApplyById(Long id)
    {
        return newApplyMapper.deleteNewApplyById(id);
    }

    @Override
    public List<NewApply> selectNewApplyByTimeRange(String timeRangeStart,String timeRangeEnd) {
        return newApplyMapper.selectNewApplyByTimeRange(timeRangeStart,timeRangeEnd);
    }
}
